<?php
//Compiled by TIBlog Template Engine v2.0 , Created on : 2011-05-04 18:19:58
defined('IN_DTE') or exit('Access Denied');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>Administrator's Control Panel</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<LINK href="/static/admin/style.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2900.3157" name=GENERATOR>
</HEAD>
<script type="text/javascript" src="/static/js/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$("#houseInfo").toggle(function(){
		$("#houseInfoBox").hide('fast');
	},function(){
		$("#houseInfoBox").show('fast');
	});
	$('#type')[0].selectedIndex = <?php
echo $_obj['type'];
?>
;
	chStyle('<?php
echo $_obj['type'];
?>
');
});
function chStyle(e){
	//$("tbody[id^='style']").hide();
	$("#source_1").hide();
	$("#source_2").hide();
	$("#source_3").hide();
	$("#source_"+e).show();
}
</script>
<BODY id=main>
<FORM name="upload" method="POST" enctype="multipart/form-data" action="">
<h2 id="houseInfo" style="CURSOR: pointer;">编辑广告</h2>
<table cellspacing="0" cellpadding="0" width="100%"  class="maintable" id="houseInfoBox" >
<tr><th>广告名称</th><td><input name="name" type="text" size="50" value="<?php
echo $_obj['name'];
?>
" /></td></tr>
<tr><th>广告类型</th><td>
<select name="type" id="type" onchange="chStyle(this.value);">
	<OPTION value="">选择类型</OPTION>
	<OPTION value="1">图片</OPTION>
	<OPTION value="2">代码</OPTION>
	<OPTION value="3">FLASH</OPTION>
</select>
</td></tr>
<tr><th>模板标记</th><td><input type="text" size="50" value="{ ads_<?php
echo $_obj['id'];
?>
 }" disabled/></td></tr>
<tr><th>广告状态</p></th><td><input type='checkbox' name="is_verify" class="checkbox" value="1" <?php
echo $_obj['is_verify'];
?>
/>启用</td></tr>
<tr><th>广告资源</th><td>
<div id="source_1" style="display:none">	
	<?php
echo $_obj['adContent'];
?>

	图片文件：<input name="sourceimg" class="input" type="file" size=30 value=""><br>
	图片链接：<input name="source[image][url]" type="input" size="50" value="<?php
echo $_obj['url'];
?>
" /><br>
	图片宽度：<input name="source[image][width]" type="input" size="50" value="<?php
echo $_obj['width'];
?>
" /><br>
	图片高度：<input name="source[image][height]" type="input" size="50" value="<?php
echo $_obj['height'];
?>
" /><br>
</div>
<div id="source_2" style="display:none">
	<textarea rows="6" name="source[code]" cols="50" class="tarea" style="width:520px;"><?php
echo $_obj['adContent'];
?>
</textarea>
</div>
<div id="source_3" style="display:none">	
	<?php
echo $_obj['adContent'];
?>

	Flash 文件：<input name="sourceflash" class="input" type="file" size=30 value=""><br>
	Flash 宽度：<input name="source[flash][width]" type="input" size="50" value="<?php
echo $_obj['width'];
?>
" /><br>
	Flash 高度：<input name="source[flash][height]" type="input" size="50" value="<?php
echo $_obj['height'];
?>
" /><br>
</div>
</td></tr>
</table>
<div class="buttons">
<input type="hidden" name="id" value="<?php
echo $_obj['id'];
?>
">
<input type="submit" value="提交" id="submit" class="btn">
<input type="reset" value="重置" class="btn">
</div>
</form>
<br>
</BODY></HTML>
